Skip to content

Latest commit

 

History

History
120 lines (77 loc) · 2.16 KB

File metadata and controls

120 lines (77 loc) · 2.16 KB

anchor tag:

<a href=“https://path”  target=“_blank” >	           
	
<!-- attribute target =“_blank” makes it open in new tab. -->

values for the target attribute:

_blank “Loads the linked document in new tab”
_self “Loads in the same frame which held the link”
_parent “loads in Parent frame ”
name of frame “loads in the named frame”

note: 💡 frame element has attribute name= “ ” that allows us to name the frame.


title attribute:

  • title = “text that will be displayed when hover over by mouse”, title contains text that will be displayed when hover over by mouse.

example:

  <a href="https://www.google.com" title="secret msg"> Hover Over </a>

output:


  Hover Over

related link vs absolute link?


Internal linking to other pages in the same site:

Moving into the folders

Moving out of the folders

/folderName used to go into a folder.

../ used to go outside a folder. ../../ used to go two folders back.

tip: use attribute target = “_self” to make it open in same frame.


External linking to other websites:

<a href=“https://link”  target=“_blank” > 	      
  
<!-- don’t forget to include full link with https -->

tip: use attribute target = “_blank” to make it open in new tab.


linking to the sections of a document or sections of same page:

<a href= “#section2”> goto section 2</a>		
<section id= “section2”>
	lorem ipsum gutyt saukg aruvz ufszbu sryjncs ...
</section>

<!-- used as fragment identifiers as it adds #sectionname in url -->